import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path:"/login",
    name:"login",
    component:()=> import ('@/views/login/index.vue')
  },
  {
    path:'/',
    name:'layout',
    component:()=>import('@/views/layout/index.vue'),
    children:[
      {
        path:'',
        name:'home',
        component:()=>import('@/views/home/index.vue')

      },
      {
        path:'my',
        name:'home',
        component:()=>import('@/views/home/my.vue')

      },
      {
        path:'views',
        name:'home',
        component:()=>import('@/views/home/views.vue')

      },
      {
        path:'qa',
        name:'home',
        component:()=>import('@/views/home/qa.vue')

      },
      {
        path:"/serach",
        name:'serach',
        component:()=>import('@/views/search/index.vue')
      }
      
    ]
  },
  {
    path:`/articledetails/:ur_id`,
    name:'articledetails',
    component:()=>import('@/views/artcei/index.vue'),
    props:true

  },
 
  {
    path:`/user/profile`,
    name:'user-profile',
    component:()=>import('@/views/userData/userDate.vue')
    

  }
  
]

const router = new VueRouter({
  routes
})

export default router
